﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using WeiXinPF.Common;
using WeiXinPF.Templates;

namespace WeiXinPF.Web.modules.cdrt.smart
{
    /// <summary>
    /// 微信矩阵
    /// </summary>
    public partial class wechat_matrix : TBasePage
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            base.OnInit(e);
            if (!string.IsNullOrEmpty(errInitTemplates))
            {
                Response.Write(errInitTemplates);
                return;
            }

            BLL.wx_templates tBll = new BLL.wx_templates();
            templateIndexFileName = tBll.GetTemplatesFileNameByWid(wid);
            if (string.IsNullOrEmpty(templateIndexFileName))
            {
                errInitTemplates = "不存在该帐号或者该帐号尚未设置模版！";
                Response.Write(errInitTemplates);
                Response.End();
                return;
            }

            
            tPath = MyCommFun.GetRootPath() + "/modules/cdrt/smart/templates/wechat_matrix.html";
            TemplateMgr template = new TemplateMgr(tPath, wid);
            template.tType = TemplateType.Index;
            template.openid = MyCommFun.RequestOpenid();
            template.OutPutHtml(templateIndexFileName, wid);
            
        }
    }
}